<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>后台管理主页</title>
		<link rel="stylesheet" type="text/css" href="/css/manager.css" />
		<script src="/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/js/manager_siderlist.js" type="text/javascript" charset="utf-8"></script>
		<script src="/ueditor/ueditor.config.js" type="text/javascript" charset="utf-8"></script>
		<script src="/ueditor/ueditor.diy.all.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/ueditor/lang/zh-cn/zh-cn.js" type="text/javascript" charset="utf-8"></script>
		<script src="/js/add_product.js" type="text/javascript" charset="utf-8"></script>

	</head>

	<body>
		<div id="container">
			<!--顶部-->
			<% include ../template/manager_header.html %>
			<!--内容-->
			<div id="content">
				<div class="top_nav">
					<a href="#">管理首页</a>>>
					<a href="#">XX管理</a>>>
					<a href="#">XX页面</a>
				</div>
				<div class="content_panel clearfix">
					<!--侧边管理链接-->
					<% include ../template/manager_siderlist.html %>
					<div class="panel_right fr">

						<!--产品发布-->
						<div class="add_list">
							<form action="/manager/modify_goodshandle" enctype="multipart/form-data" method="post">
								<table id="list_style" class="add_product">
									<thead>
										<tr>
											<input type="text" style="display: none;" name="product_Id" id="product_Id" value="<%=productInfo.product_Id%>" />
											<th colspan="2">编辑产品</th>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td class="left">产品名称</td>
											<td><input type="text" id="goods_name" name="goods_name" value="<%=productInfo.product_name%>" placeholder="请输入产品名称" /> </td>
										</tr>
										<tr>
											<td class="left">产品分类</td>
											<td class="right">
												<select id="categorylist" name="category">
													<%for(var i=0;i<categorylist.length;i++){%>
													<option value="<%=categorylist[i].category_Id%>">
														<%=categorylist[i].category_name%>
													</option>
													<%}%>
												</select>

											</td>
										</tr>
										<tr>
											<td class="left">原价格</td>
											<td><input class="price" type="text" id="old_price" value="<%=productInfo.old_price%>" name="old_price" placeholder="0.00" /><span class="red paddingleft10">价格单位保留小数点后两位</span></td>
										</tr>
										<tr>
											<td class="left price">现价格</td>
											<td><input class="price" type="text" id="new_price" value="<%=productInfo.new_price%>" name="new_price" placeholder="0.00" /><span class="red paddingleft10">价格单位保留小数点后两位</span></td>
										</tr>
										<tr>
											<td class="left price">优惠价格</td>
											<td><input class="price" type="text" id="favourable_price" value="<%=productInfo.product_favourable%>" name="favourable_price" placeholder="0.00" /><span class="red paddingleft10">价格单位保留小数点后两位</span></td>
										</tr>
										<tr>
											<td class="left">产品图片展示</td>
											<td class="upload_panel">
												<input type="file" name='pd_img' id="pd_img" value="" />
												<input type="button" value="添加" id="add_upload"><br>
												<div class="add_file">
												</div>
												<span class="warning hidden">最多添加五张展示图片</span>
											</td>
										</tr>
										<tr>
											<td class="left">产品库存</td>
											<td><input class="product_amount" name="goods_amount" type="text" id="" value="<%=productInfo.product_amount%>" placeholder="0" /><span class="red paddingleft10">库存最大数量为9999</span> </td>
										</tr>
										<tr>
											<td class="left">快递费用</td>
											<td><input class="price" name="goods_expressfee" value="<%=productInfo.product_expressfee%>" type="text" id="" placeholder="0.00" /><span class="red paddingleft10">价格单位保留小数点后两位</span> </td>
										</tr>
										<tr>
											<td class="left">产品详情</td>
											<td>
												<!--<textarea name="content" style="width: 700px;" rows="20"></textarea>-->
												<script id="editor" type="text/plain" style="width:700px;height:300px;"></script>
												<textarea style="display: none;" name="modifycontent" rows="10"><%=productInfo.product_detail%></textarea>
												<script type="text/plain" id="cont" name="cont" style="width: 800px; height: 200px;">
													<%-productInfo.product_detail%>
												</script>
												<script type="text/javascript">
													var ue = new baidu.editor.ui.Editor({
														textarea: 'editor'
													}); //UE.getEditor('editor');
													//var textval=$('textarea[name=modifycontent]').val();													
													//ue..render("cont");
													ue.render("cont");
													//ue.setContent(textval);
												</script>
												<input type="hidden" name="content" id="content" value="" />
											</td>
										</tr>
										<tr>
											<td colspan="2" class="submit_btn_panel">
												<input type="submit" value="编辑产品" />
											</td>
										</tr>
									</tbody>
									<tfoot>
										<tr>
											<td colspan="2" class="h30">
											</td>
										</tr>
									</tfoot>
								</table>
							</form>
						</div>
					</div>
				</div>
			</div>
			<!--底部-->
			<div id="footer">
				后台管理系统 2017-2017
			</div>
		</div>

	</body>

</html>